package com.von.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.von.entity.DictionaryItem;
import com.von.param.DictionaryItemParam;
import com.von.result.R;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 字典-项 服务类
 * </p>
 *
 * @author xiaosai
 * @since 2021-07-09
 */
public interface IDictionaryItemService extends IService<DictionaryItem> {

    /**
     * 分页获取
     * @param dictionaryItemParam
     * @return
     */
    R<Page<DictionaryItem>> list(DictionaryItemParam dictionaryItemParam);

    /**
     * 添加
     * @param dictionaryItem
     * @return
     */
    R<String> add(DictionaryItem dictionaryItem);

    /**
     * 更新
     * @param dictionaryItemParam
     * @return
     */
    R<String> update(DictionaryItemParam dictionaryItemParam);

    /**
     * 删除
     * @param id
     * @return
     */
    R<String> del(Integer id);

    /**
     * 导出
     * @param response
     * @param groupId
     */
    void exportDictionaryItem(HttpServletResponse response, Integer groupId);

    /**
     * 下载模板
     * @param response
     */
    void downloadDictionaryItem(HttpServletResponse response);

    /**
     * 导入
     * @param file
     * @param groupId
     * @return
     */
    R<String> importDictionaryItem(MultipartFile file, Integer groupId);
}
